class Person{
    constructor(...param){
        console.log(param);
        this.arr = []
    }
    get outSideData(){
        return this.arr
    }
    set outSideData(a){
        if(a!==1){
            this.arr.push(a)
        }  
    }
    getArr(){
        console.log(this.arr,'arr');
    }
}

class Son extends Person{
    constructor(...sonparams){
    console.log(sonparams,'sonparams');
    
    }
    sonFunc(){
        super.getArr();
        console.log('son');
    }
}
// const person = new Person(1,2,3)
// person.outSideData = 'first';
// person.outSideData = 'second';
// person.getArr()


const son = new Son(4,5)
son.outSideData = 'third';
son.outSideData = 'four';
son.sonFunc()